﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/MainForm.master" AutoEventWireup="true"
    CodeFile="BookDetails.aspx.cs" Inherits="Views_BookDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="header" runat="Server">
    <style type="text/css">
        .style1
        {
            width: 168px;
        }
        .style2
        {
            width: 138px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
    Book Details
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentRight" runat="Server">
    <table style="width: 100%;">
        <tr>
            <td class="style1" rowspan="12">
                &nbsp;
                &nbsp;
                &nbsp;
                &nbsp;
                &nbsp;
                &nbsp;
                <asp:Image ID="imgBook" runat="server" Width="150px" />
            </td>
            <td>
                <asp:Label ID="lbName" runat="server" Font-Size="XX-Large"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbAuthor" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbUser" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbCategory" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbPublicationYear" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbPurposeOfSelling" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbSellingPrice" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbDescription" runat="server" Font-Size="12pt"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lbDescription0" runat="server" Font-Size="12pt">Rate: </asp:Label>
                <asp:RadioButtonList ID="rdbtnlstRate" runat="server" BackColor="Yellow" 
                    BorderColor="Red" BorderWidth="0px" Font-Size="Medium" 
                    RepeatDirection="Horizontal" RepeatLayout="Flow" ToolTip=" Rate this book" 
                    AutoPostBack="True" onselectedindexchanged="rdbtnlstRate_SelectedIndexChanged">
                    <asp:ListItem Value="1"></asp:ListItem>
                    <asp:ListItem Value="2"></asp:ListItem>
                    <asp:ListItem Value="3"></asp:ListItem>
                    <asp:ListItem Value="4"></asp:ListItem>
                    <asp:ListItem Value="5"></asp:ListItem>
                </asp:RadioButtonList>
&nbsp;<asp:Label ID="lbThank" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:CheckBox ID="chkTransaction" runat="server" 
                    Text="Transaction with my book" AutoPostBack="True" 
                    oncheckedchanged="chkTransaction_CheckedChanged" Font-Size="12pt" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:TextBox ID="txtMessage" runat="server" TextMode="MultiLine" Height="70px" 
                    Width="100%">G&#7917;i thông tin &#273;&#7871;n ng&#432;&#7901;i s&#7903; h&#7919;u sách t&#7841;i &#273;ây...</asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <table>
                    <tr>
                        <td class="style2" width="120">
                            <asp:ListBox ID="lbMybook" runat="server" DataSourceID="sqlDsMyBook" 
                                DataTextField="Title" DataValueField="ID" Visible="False" Width="200px">
                            </asp:ListBox>
                            <asp:SqlDataSource ID="sqlDsMyBook" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:conStr %>" 
                                ProviderName="<%$ ConnectionStrings:conStr.ProviderName %>" 
                                SelectCommand="SELECT [ID], [Title] FROM [Book] WHERE ([UserID] = @UserID)">
                                <SelectParameters>
                                    <asp:SessionParameter Name="UserID" SessionField="UserID" Type="String" />
                                </SelectParameters>
                            </asp:SqlDataSource>
                        </td>
                        <td>
                        <asp:Label runat="server" ID="lbMoney" 
                                Text="S&#7889; ti&#7873;n c&#7847;n chi thêm khi trao &#273;&#7893;i sách" Visible="False"></asp:Label>
                            <asp:TextBox runat="server" ID="txtMoney" Visible="False" Width="100%"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
            <td class="style1">
                &nbsp;
            </td>
            <td>
                &nbsp;
                <asp:Button ID="btnSendRequest" runat="server" Text="Send Request" 
                    BackColor="#3366FF" BorderColor="#3366FF" BorderWidth="0px" Height="30px" 
                    onclick="btnSendRequest_Click" />
            </td>
    </table>
</asp:Content>
